home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
tobby_on_ice.swf
/
scripts
/
frame_42
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
3KB
|
97 lines
this.stat = "standby";
this.itemGetCnt = 0;
this.scrollFlg = false;
this.totalBonusCnt = 0;
var nName = "tobbyMC";
this.attachMovie("tobby",nName,_root.depthChar++);
this[nName]._x = 320;
this[nName]._y = 445;
switch(this.stageNum)
{
case 1:
case 2:
case 4:
var idName = "BG_base";
break;
case 3:
var idName = "BG_baseBonus";
break;
case 5:
var idName = "BG_baseJelly";
}
this.attachMovie(idName,"bgMC",this.depthBG++);
this.bgMC._y = 55;
if(this.stageNum != 3 && this.stageNum != 5)
{
var nName = "bullMC";
this.attachMovie("bull",nName,_root.depthchar++);
this[nName]._x = 600;
this[nName]._y = 145;
}
this.speedList = [[0,-2,-3,-4,-5,-4,-3,-2,0],[0,-2,-3,-4,-5,-4,-3,-2,0],[0,-3,-2,-4,-6,-3,-2,-1,0],[0,-2,-6,-4,-5,-4,-3,-2,0],[0,-2,-4,-2,-6,-5,-3,-4,0]];
this.iceMCList = [[_root.bgMC.groundTopMC],[],[],[],[],[],[],[],[_root.bgMC.groundBtmMC]];
this.iceSizeList = [0,80,110,140,140,140];
i = 0;
while(i < 7)
{
this.SetLocX = 0;
c = 0;
while(c < 8)
{
var nName = "ice" + String(i + 1) + String(c);
var sety = 160 + i * 38;
var depth = _root.depthIce + i * 100 + c * 10;
this.attachMovie("ice",nName,depth);
this[nName]._x = this.SetLocX;
this[nName]._y = sety;
this[nName].pdx = this.speedList[this.stageNum - 1][i + 1];
var iceNum = this.iceNumList[this.stageNum - 1][i][c];
this[nName].iceSize = iceNum;
this.SetLocX += this.iceSizeList[iceNum] + _root.randomInt(10) * 11;
this.iceMCList[i + 1].push(this[nName]);
c++;
}
cc = 0;
while(cc < this.iceMCList[i + 1].length)
{
this.iceMCList[i + 1][cc].resetLocX = this.SetLocX;
cc++;
}
i++;
}
var nName = "waterEffectMC";
this.attachMovie("waterEffect",nName,_root.depthWaterEffect++);
this[nName]._x = -100;
this[nName]._y = 0;
var itemSetList = [[1,3,2,5,2,3,2,5],[3,1,5,6,3,2,5,6],[],[9,8,7,6,5,7,3,2],[]];
this.itemMCList = [];
i = 0;
while(i < itemSetList[this.stageNum - 1].length)
{
var nName = "item" + String(i);
this.attachMovie("item",nName,this.depthItem++);
this[nName]._x = -200 + 100 * i;
this[nName]._y = 135;
this[nName].itemNum = itemSetList[this.stageNum - 1][i];
this.itemMCList.push(this[nName]);
i++;
}
this.attachMovie("score","scoreMC",this.depthIF++);
this.scoreMC._x = 22;
this.scoreMC._y = 64;
this.attachMovie("lastPlayer","lastPlayerMC",this.depthIF++);
this.lastPlayerMC._x = 507;
this.lastPlayerMC._y = 64;
if(this.stageNum != 3 && _this.stageNum != 5)
{
this.attachMovie("myItem","myItemMC",this.depthIF++);
this.myItemMC._x = 22;
this.myItemMC._y = 430;
}
if(this.stageNum == 3)
{
this.attachMovie("lastSec","LastSecMC",this.depthIF++);
this.LastSecMC._x = 380;
this.LastSecMC._y = 80;
}